package com.david.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.david.auth.pojo.entity.AuthClientEntity;
import com.david.auth.pojo.query.SignQuery;
import com.david.auth.pojo.query.TokenQuery;


/**
 * <p>
 * 授权客户端管理 Service 接口
 * </p>
 *
 * @author David
 * @Date 2022-04-18 15:26:46
 */
public interface IAuthClientService extends IService<AuthClientEntity> {

	/**
	 * 获取token
	 * @param tokenQuery
	 * @return
	 */
	String getToken(SignQuery tokenQuery);

	/**
	 * 根据appkey 获取client
	 * @param appkey
	 * @return
	 */
	AuthClientEntity getAuthClient(String appkey);

	/**
	 * 验证token
	 * @param tokenQuery
	 * @return
	 */
	boolean verifyToken(TokenQuery tokenQuery);

}
